package org.webdriver.patatiumwebui.action;

import org.webdriver.patatiumwebui.pageObject.LoginPage;
import org.webdriver.patatiumwebui.pageObject.LoginsmsPage;
import org.webdriver.patatiumwebui.utils.ElementAction;
import org.webdriver.patatiumwebui.utils.TestBaseCase;

public class LoginsmsAction extends TestBaseCase {
    public LoginsmsAction(String url,String username,String password){
        LoginsmsPage loginsmsPage=new LoginsmsPage();
        loginsmsPage.open(url);
        System.out.println(driver.getCurrentUrl());
        ElementAction action=new ElementAction();
        action.sleep(1);
        action.clear(loginsmsPage.用户名输入框());
        action.type(loginsmsPage.用户名输入框(),username);
        action.clear(loginsmsPage.密码输入框());
        action.type(loginsmsPage.密码输入框(),password);
        action.click(loginsmsPage.登录按钮());
    }
}
